package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Yancy xiao
 * @create 2023-01-03 17:10
 */
@Controller
public class HelloController {
    @RequestMapping("/")
    public String protal() {
        return "index";
    }

    @RequestMapping("/hello")
    public String Hello() {
        return "success";
    }

  /*  @RequestMapping(value = "/hello", params = {"username=admin"})
    public String test() {
        return "success";
    }*/

    @RequestMapping("/hello/{id}/{username}")
    public String testMap(@PathVariable("id") Integer id, @PathVariable("username") String username) {
        System.out.println(id+username);
        return "success";
    }

}
